//
// Created by 尚衍硕 on 18/11/19.
//
#include <iostream>
#include <list>
#include <gtest/gtest.h>

using namespace std;


//从前向后显示list队列的全部元素
void print_list(list<int> list, char *name)
{
    std::list<int>::iterator plist;

    cout << "The contents of " << name << " : ";
    for (plist = list.begin(); plist != list.end(); plist++)
        cout << *plist << " ";
    cout << endl;
}

int my_list_test(){
    cout << "\n" << endl;
    list<int> list(5, 1);
    print_list(list,"my_list");
    list.push_back(6);
    print_list(list,"my_list");

    cout << list.back() << endl;
    print_list(list,"my_list");
    return 1;
}


TEST(my_list_TEST,test0){
    ASSERT_EQ(1,my_list_test());
}


